<%--
  Created by IntelliJ IDEA.
  User: WT-SUN
  Date: 2017/4/20
  Time: 9:42
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="accessory" uri="http://accessoryPackageTag.weitu.net" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!doctype html>
<html>
<head>
    <title>体检异常数据</title>
    <%@include file="/common/header.jspf" %>
    <script type="text/javascript">
        var arrForbid = [];
        var arrDoubt=[];
        var arrOther=[];
        var arrReview=[];
        <c:if test="${fn:length(phy.phyForbid) >0}">
        <c:forEach var="lis" items="${phy.phyForbid}">
        var obj = {
            id:'${lis.id}',
            forbidName:'${lis.forbidName}',
            forbidWork:'${lis.forbidWork==null?"":lis.forbidWork}',
            remarks:'${lis.remarks==null?"":lis.remarks}'
        }
        arrForbid.push(obj);
        </c:forEach>
        </c:if>
        <c:if test="${fn:length(phy.phyDoubt) >0}">
        <c:forEach var="lis" items="${phy.phyDoubt}">
        var obj = {
            id:'${lis.id}',
            diseasesName:'${lis.diseasesName}',
            diseasesCode:'${lis.diseasesCode==null?"":lis.diseasesCode}',
            remarks:'${lis.remarks==null?"":lis.remarks}'
        }
        arrDoubt.push(obj);
        </c:forEach>
        </c:if>
        <c:if test="${fn:length(phy.phyOther) >0}">
        <c:forEach var="lis" items="${phy.phyOther}">
        var obj = {
            id:'${lis.id}',
            diseasesName:'${lis.diseasesName}',
            remarks:'${lis.remarks==null?"":lis.remarks}'
        }
        arrOther.push(obj);
        </c:forEach>
        </c:if>
        <c:if test="${fn:length(phy.phyReview) >0}">
        <c:forEach var="lis" items="${phy.phyReview}">
        var obj = {
            id:'${lis.id}',
            phyId:'${lis.phyId}',
            reConclusion:'${lis.reConclusion}',
            reConclusionName:'${lis.reConclusionName}',
            diseasesNameId:'${lis.diseasesNameId}',
            diseasesName:'${lis.diseasesName}',
            serviceId:'${lis.serviceId}',
            forbidWork:'${lis.forbidWork}',
            diagnosisDate:'${lis.diagnosisDate}',
            addTime:'${lis.addTime}',
            serviceName:'${lis.serviceName}',
            remarks:'${lis.remarks==null?"":lis.remarks}'
        }
        arrReview.push(obj);
        </c:forEach>
        </c:if>
        var arrReCom=[];
        <c:if test="${fn:length(re) >0}">
        <c:forEach var="lis" items="${re}">
        var obj = {
            id:'${lis.id}',
            text:'${lis.text}'
        }
        arrReCom.push(obj);
        </c:forEach>
        </c:if>
        var arrZyCom=[];
        <c:if test="${fn:length(zy) >0}">
        <c:forEach var="lis" items="${zy}">
        var obj = {
            id:'${lis.id}',
            text:'${lis.text}'
        }
        arrZyCom.push(obj);
        </c:forEach>
        </c:if>
        var arrphyDiagnosis=[];
        <c:if test="${fn:length(phy.phyDiagnosis) >0}">
        <c:forEach var="lis" items="${phy.phyDiagnosis}">
        var newid = $.generateUUID();
        var obj = {
            id:newid,
            oldid:'${lis.id}',
            remarks:'${lis.remarks}',
            conclusionId:'${lis.conclusionId}',
            conclusionName:'${lis.conclusionName}',
            conclusionNameOld:'${lis.conclusionName}',
            diseasesNameId:'${lis.diseasesNameId}',
            diagnosisDate:'${lis.diagnosisDate}',
            startTime:'${lis.startTime}',
            workYears:'${lis.workYears}',
            zgSituation:'${lis.zgSituation}',
            phyId:'${lis.phyId}',
            diseasesName:'${lis.diseasesName}',
            serviceId:'${lis.serviceId}',
            serviceName:'${lis.serviceName}',
            isZy:'noZy'
        }
        arrphyDiagnosis.push(obj);
        </c:forEach>
        </c:if>
        var arrphyTgStation=[];
        /* t.id, t.delState,
         t.orgPosition,u.name orgPositionName, t.nowCompanyName,
         d.name realCoName, t.nowPosition, uu.name nowPositionName,t.shiftDate, t.phyId*/

        <c:if test="${fn:length(phy.phyTgStation) >0}">
        <c:forEach var="lis" items="${phy.phyTgStation}">
        var obj = {
            id:'${lis.id}',
            remarks:'${lis.remarks}',
            orgPosition:'${lis.orgPosition}',
            orgPositionName:'${lis.orgPositionName}',
            nowCompanyName:'${lis.nowCompanyName}',
            realCoName:'${lis.realCoName}',
            nowPosition:'${lis.nowPosition}',
            nowPositionName:'${lis.nowPositionName}',
            shiftDate:'${lis.shiftDate}',
            phyId:'${lis.phyId}'
        }
        arrphyTgStation.push(obj);
        </c:forEach>
        </c:if>
        var danweiName="";
        <c:if test="${fn:length(phy.userDepartmentList) >0}">
        <c:forEach var="lis" items="${phy.userDepartmentList}">
        danweiName += ',' + '${lis.deptName}';
        </c:forEach>
        danweiName=danweiName.substring(1);
        </c:if>
        var phyHarmIdsName="";
        <c:if test="${fn:length(phy.phyHarmIds) >0}">
        <c:forEach var="lis" items="${phy.phyHarmIds}">
        phyHarmIdsName += ',' +'${lis.name}';
        </c:forEach>
        phyHarmIdsName=phyHarmIdsName.substring(1);
        </c:if>
    </script>
    <script type="text/javascript" src="${ctx}/resources/js/occupationalHealth/phyData/abnormalInfo.js"></script>
</head>
<body>
<div class="menu-right" style="width:80px;">
    <%--<a id="btn_save" href="javascript:void(0)" class="easyui-linkbutton" iconCls="fa fa-save fa-lg">保存</a>--%>
</div>
<form id="formPhyData" method="POST">
    <div class="information">
        <div class="information-title">
            <p>基本信息</p>
            <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
        </div>

        <div class="cuttle">
            <div style="clear: both">
                <div class="form_one">
                    <label class="lable-style">姓名:</label>
                    <input type="text" name="userId" class="easyui-textbox" value="${phy.userPhy==null?"":phy.userPhy}"
                           style="width:240px;" data-options="readonly:true"/>
                </div>
                <div class="form_one">
                    <label class="lable-style">工号:</label>
                    <input class="easyui-textbox" type="text" id="gonghao" data-options="readonly:true"  value="${phy.userCode==null?"":phy.userCode}"
                           style="width: 240px;">
                </div>
                <div class="form_one">
                    <label class="lable-style">性别:</label>
                    <input class="easyui-textbox" type="text" id="xingbie" <c:if test="${phy.gender!=null}">  value="${phy.gender=='1'?"男":'女'}" </c:if> data-options="readonly:true"
                           style="width: 240px;">
                </div>
            </div>
            <div style="clear: both">
                <div class="form_one">
                    <label class="lable-style">单位名称:</label>
                    <input id="danwei" type="text" class="easyui-textbox" data-options="readonly:true"
                           style="width: 240px;">
                </div>
                <div class="form_one">
                    <label class="lable-style">岗位:</label>
                    <input id="gangwei" type="text" class="easyui-textbox"  value="${phy.postName==null?"":phy.postName}" data-options="readonly:true"
                           style="width: 240px;">
                </div>
                <div class="form_one">
                    <label class="lable-style">主要症状:</label>
                    <input class="easyui-textbox" type="text"  data-options="readonly:true"
                           style="width: 240px;"  value="${phy.mainSymptom==null?"":phy.mainSymptom}" >
                </div>

            </div>
            <div style="clear: both">
                <div class="form_one">
                    <label class="lable-style">体检批次:</label><%--editable="false"--%>
                    <input class="easyui-textbox" type="text"  data-options="readonly:true"
                           style="width: 240px;"  value="${phy.batch}">
                </div>
                <div class="form_one">
                    <label class="lable-style">体检类别:</label>
                    <input id="leibie" type="text" class="easyui-textbox" value="${phy.planType==null?"":phy.planType}"
                           data-options="readonly:true" style="width: 240px;">
                </div>
                <div class="form_one">
                    <label class="lable-style">诊断单位:</label>
                    <input class="easyui-textbox" type="text"  data-options="readonly:true"
                           style="width: 240px;"  value="${phy.serviceName==null?"":phy.serviceName}" >
                </div>
            </div>
            <div class="district-wrap" style="clear: both">
                <div class="form_one" style="width: 720px;">
                    <label class="lable-style">接触职业危害:</label>
                    <input class="easyui-textbox" type="text" id="zyweihai" editable="false"  data-options="readonly:true" style="width:600px;">
                    <input type="hidden" id="hazardFactorId" name="hazardFactor" />
                </div>
                <div class="form_one">
                    <label class="lable-style">体检日期:</label>
                    <input class="easyui-textbox" type="text"  data-options="readonly:true"
                           style="width: 240px;"  value="${phy.physicalDate==null?"":phy.physicalDate}" >
                </div>
            </div>
        </div>
    </div>
    <div class="information">
        <div class="information-title">
            <p>体检结果</p>
            <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
        </div>
        <div class="cuttle">
            <div style="clear: both">
                <div class="form_one" style="width: 720px;height: 40px">
                    <label class="lable-style">体检结论:</label>
                    <c:forEach var="lis" items="${con}">
                        <input type="checkbox" <c:if
                                test="${lis.text=='未见异常'}"> class="optionno" id="conclusionNo" name="conclusion" </c:if>
                                <c:if test="${lis.text=='复查'}"> class="optiony" id="conclusionFx" name="conclusion" </c:if>
                                <c:if test="${lis.text=='职业禁忌证'}"> class="optiony" id="conclusionZy" name="conclusion" </c:if>
                                <c:if test="${lis.text=='疑似职业病'}"> class="optiony" id="conclusionYs" name="conclusion" </c:if>
                                <c:if test="${lis.text=='其它疾病或异常'}"> class="optiony" id="conclusionQt" name="conclusion" </c:if>
                                <c:forEach var="itemCon" items="${phy.phyConclusions}"> <c:if
                                        test="${itemCon.conclusionId==lis.id}"> checked="checked"  </c:if></c:forEach>
                               value="${lis.id}"  disabled="disabled" />${lis.text}
                    </c:forEach>
                </div>
            </div>
            <div style="clear: both">
                <div class="form_one" style="width: 720px;height: 60px">
                    <label class="lable-style">医生结论:</label>
                    <input name="doctorConclusion" type="text" class="easyui-textbox"
                           data-options="multiline:true,readonly:true"
                           style="width: 600px;height: 55px"
                           value="${phy.doctorConclusion==null?"":phy.doctorConclusion}"/>
                    <%--<span>*</span>--%>
                </div>
            </div>
            <div class="district-wrap" style="clear: both; <c:if test="${phy.options==null}"> display: none</c:if>" id="optionDiv">
                <div class="form_one">
                    <label class="lable-style">处理意见:</label>
                    <input class="easyui-textbox" type="text"  data-options="readonly:true"
                           style="width: 240px;"  value="${phy.optionsName==null?"":phy.optionsName}" >
                </div>
            </div>
        </div>

    </div>
    <div class="information">
        <div class="information-title">
            <p>体检附件</p>
            <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
        </div>
        <accessory:accessorySimple permission="" packageKey="phypage" uploadUserId="${loginUser.id}"
                                   packageInfos="${accessoryList}"
                                   accessoryType="txt,docx,doc,xls,xlsx,jpg,png"></accessory:accessorySimple>
    </div>
</form>
<div class="information" id="occforbidTbDiv" style="display:block;">
    <div class="information-title">
        <p>职业禁忌证</p>
        <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
    </div>
    <div class="enclosure">
        <table id="occforbidTb"></table>
    </div>
</div>
<div class="information" id="occdoubtTbDiv" style="display:block;">
    <div class="information-title">
        <p>疑似职业病</p>
        <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
    </div>
    <div class="enclosure">
        <table id="occdoubtTb"></table>
    </div>
</div>
<div class="information" id="occotherTbDiv" style="display:block;">
    <div class="information-title">
        <p>其他疾病或异常</p>
        <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
    </div>
    <div class="enclosure">
        <table id="occotherTb"></table>
    </div>
</div>
<form id="yichangchuzhi">
    <input type="hidden" id="phyId" name="phyId" value="${phy.id}"/>
    <input type="hidden"  name="userId" value="${phy.userId}"/>
    <div class="information" id="occStateTbDiv" style="display:block;">
        <div class="information-title">
            <p>复查信息</p>
            <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
        </div>
        <div class="enclosure">
            <table id="occReviewTb"></table>
        </div>
        <div class="cuttle">
            <div style="clear: both">
                <div class="form_one" style="width: 720px;height: 40px">
                    <label class="lable-style">处理状态:</label>
                    <span>*</span>
                    <c:if test="${fn:length(phy.phyConclusionsState) >0}">
                        <c:forEach var="lis" items="${op}">
                            <input type="checkbox" <c:if
                                    test="${lis.text=='定期复查'}"> class="optionno" id="conclusionDqy" name="yConclusion" </c:if>
                                    <c:if test="${lis.text=='职业病诊断'}"> class="optiony" id="conclusionZdy" name="yConclusion" </c:if>
                                    <c:if test="${lis.text=='调岗'}"> class="optiony" id="conclusionTgy" name="yConclusion" </c:if>
                                    <c:if test="${lis.text=='其它'}"> class="optiony" id="conclusionQty" name="yConclusion" </c:if>
                                    <c:if test="${phy.options==lis.id}"> checked="checked"  </c:if>
                                    <c:forEach var="itemCon" items="${phy.phyConclusionsState}"> <c:if
                                            test="${itemCon.conclusionId==lis.id}"> checked="checked"  </c:if></c:forEach>
                                   value="${lis.id}" disabled="disabled"  />${lis.text}
                        </c:forEach>
                    </c:if>
                    <c:if test="${fn:length(phy.phyConclusionsState) ==0}">
                        <c:forEach var="lis" items="${op}">
                            <input type="checkbox" <c:if
                                    test="${lis.text=='定期复查'}"> class="optionno" id="conclusionDqy" name="yConclusion" </c:if>
                                    <c:if test="${lis.text=='职业病诊断'}"> class="optiony" id="conclusionZdy" name="yConclusion" </c:if>
                                    <c:if test="${lis.text=='调岗'}"> class="optiony" id="conclusionTgy" name="yConclusion" </c:if>
                                    <c:if test="${lis.text=='其它'}"> class="optiony" id="conclusionQty" name="yConclusion" </c:if>
                                    <c:if test="${phy.options==lis.id}"> checked="checked"  </c:if>
                                   value="${lis.id}" disabled="disabled"  />${lis.text}
                        </c:forEach>
                    </c:if>
                </div>
            </div>
        </div>
    </div>
    <div class="information" id="occZdTbDiv" style="display:block;">
        <div class="information-title">
            <p>职业病诊断</p>
            <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
        </div>
        <div class="enclosure">
            <table id="occZdTb"></table>
        </div>
    </div>

    <div class="information" id="tiaogangDiv" style="display:none;">
        <div class="information-title">
            <p>调岗信息</p>
            <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
        </div>
        <div class="cuttle">
            <div style="clear: both">
                <div class="form_one">
                    <label class="lable-style">现单位名称:</label>
                    <input type="text" name="userId" class="easyui-textbox"
                           value="${phy.phyTgStation[0].realCoName==null?"":phy.phyTgStation[0].realCoName}"
                           style="width:240px;" data-options="readonly:true"/>
                </div>
                <div class="form_one">
                    <label class="lable-style">现岗位:</label>
                    <input type="text" name="userId" class="easyui-textbox"
                           value="${phy.phyTgStation[0].nowPositionName==null?"":phy.phyTgStation[0].nowPositionName}"
                           style="width:240px;" data-options="readonly:true"/>
                </div>
                <div class="form_one">
                    <label class="lable-style">调动日期:</label>
                    <input class="easyui-datebox" style="width: 240px;" data-options="editable:false,readonly:true" value="${phy.phyTgStation[0].shiftDate==null?"":phy.phyTgStation[0].shiftDate}"   name="shiftDate">
                </div>
            </div>
            <%--<div style="clear: both">
                <div class="form_one" style="width: 720px">
                    <label class="lable-style">调动日期:</label>
                    <input class="easyui-datebox" style="width: 240px;" data-options="editable:false,readonly:true" value="${phy.phyTgStation[0].shiftDate==null?"":phy.phyTgStation[0].shiftDate}"   name="shiftDate">
                </div>
            </div>--%>
        </div>
        <%--<input name="uploadUserId" type="hidden" class="hide" value="${loginUser.id}">--%>
        <accessory:accessorySimple permission="" packageKey="tiaogang" uploadUserId="${loginUser.id}"
                                   packageInfos="${accessoryList}"
                                   accessoryType="txt,docx,doc,xls,xlsx,jpg,png"></accessory:accessorySimple>
    </div>
    <div class="information">
        <div class="information-title">
            <p>备注</p>
            <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
        </div>
        <div class="cuttle">
            <div style="clear: both">
                <div class="form_one" style="width: 720px;height: 80px">
                    <input name="remarks" type="text" class="easyui-textbox" value="${phy.remarks==null?"":phy.remarks}" data-options="multiline:true,readonly:true"
                           style="width: 1100px;height: 75px"/>
                </div>
            </div>
        </div>
    </div>
    <div class="information">
        <div class="information-title">
            <p>登记人信息</p>
            <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
        </div>
        <div class="cuttle">
            <div style="clear: both;height: 80px">
                <div class="form_one">
                    <label class="lable-style">登记人:</label>
                    <input class="easyui-textbox" type="text" value="${phy.userName}"  data-options="readonly:true" style="width: 240px">

                </div>
                <div class="form_one">
                    <label class="lable-style">登记部门:</label>
                    <input class="easyui-textbox" type="text" value="${phy.deptName}"  data-options="readonly:true" style="width: 240px">
                </div>
                <div class="form_one">
                    <label class="lable-style">登记时间:</label>
                    <input class="easyui-textbox" type="text" value="${phy.addTime}"  data-options="readonly:true" style="width: 240px">
                </div>
            </div>
        </div>
    </div>
</form>
</body>
</html>

